package cn.stylefeng.guns.modular.storeProcurement.mapper;

import cn.stylefeng.guns.modular.storeProcurement.entity.StoreProcurement;
import cn.stylefeng.guns.modular.storeProcurement.model.params.StoreProcurementParam;
import cn.stylefeng.guns.modular.storeProcurement.model.result.StoreProcurementResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 门店采购单 Mapper 接口
 * </p>
 *
 * @author wp
 * @since 2025-09-02
 */
public interface StoreProcurementMapper extends BaseMapper<StoreProcurement> {

    /**
     * 获取列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    List<StoreProcurementResult> customList(@Param("paramCondition") StoreProcurementParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") StoreProcurementParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    Page<StoreProcurementResult> customPageList(@Param("page") Page page, @Param("paramCondition") StoreProcurementParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author wp
     * @Date 2025-09-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") StoreProcurementParam paramCondition);

    String checkCustomerOrder(@Param("orderOutNumber") String orderOutNumber);

    Page<StoreProcurementResult> findPageByStore(@Param("page") Page pageContext,@Param("paramCondition") StoreProcurementParam storeProcurementParam, @Param("condition") String condition);

    void updateOrderState(@Param("paramCondition") StoreProcurementParam storeProcurementParam);
}
